#include "socket_tcp.h"
#include "net_wr.h"
#define MAX_BUFFER_SIZE 1024

int main()
{
    char *message = "Hello from Server";
    char buffer[MAX_BUFFER_SIZE] = {0};
    Net_Wr net_opertion;
    Socket_tcp severtcp_link("127.0.0.1",8080,5,&net_opertion);
    

    severtcp_link.wait_tcp_link();
    //read(new_socket, buffer, MAX_BUFFER_SIZE);
    severtcp_link.s_read(buffer,1024);
    printf("Client: %s\n", buffer);

    // 发送消息给客户端
    //send(new_socket, message, strlen(message), 0 );
    severtcp_link.s_write(message,strlen(message));
    printf("Hello message sent\n");
    return 0;
}





